
#include <iostream>
using namespace std;

void my_sum()
{
	int sum,date1,date2;
		cin>>date1>>date2;
		__asm__ __volatile__("addl %%ebx,%%eax":"=a"(sum):"a"(date1),"b"(date2));
		cout << "the outcome is "<<sum << endl;
}

void my_sub()
{
	int sub,date1,date2;
		cin>>date1>>date2;
		__asm__ __volatile__("subl %%ebx,%%eax":"=a"(sub):"a"(date1),"b"(date2));
		cout << "the outcome is "<<sub << endl;
}

void exponentail_function()
{
	int base,index,outcome;
	cin>>base>>index;
	__asm__ __volatile__(
				"1:;"
					"mull %%ebx;"
					"subl $1,%%ecx;"
					"cmp $1,%%ecx;"
					"jg 1b"
					:"=a"(outcome)
					:"a"(base),"b"(base),"c"(index)
					);
	cout << "the exponentail outcome is "<<outcome << endl;

}

int main() {
	my_sum();
	my_sub();
	exponentail_function();
	return 0;
}
